//
//  LSZSignRecordHeaderCell.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/6/8.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZSignRecordHeaderCell.h"

@implementation LSZSignRecordHeaderCell

-(id)initWithReuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        //110,120,128
        UIView * viewBack = [[UIView alloc]init];
        viewBack.backgroundColor = RGBColor(224, 106, 103);
        [self  addSubview:viewBack];

        self.imageViewHeader = [[UIImageView alloc]init];
        [self.imageViewHeader.layer setMasksToBounds:YES];
        [viewBack addSubview:self.imageViewHeader];

        self.labelName = [[UILabel alloc]init];
        self.labelName.textColor = [UIColor whiteColor];
        [viewBack addSubview:self.labelName];

        self.labelRanking = [[UILabel alloc]init];
        self.labelRanking.textColor = [UIColor whiteColor];
        [viewBack addSubview:self.labelRanking];



        if (ScreenWidth == 320) {
            //5
            self.labelName.font = FONT_(14.5);
            self.labelRanking.font = FONT_(13.5);

            viewBack.frame = CGRectMake(0, 0, ScreenWidth, 110);
            self.imageViewHeader.frame = CGRectMake(15,(110-70)/2 ,70,70);
            [self.imageViewHeader.layer setCornerRadius:self.imageViewHeader.frame.size.height/2];
            self.labelName.frame = CGRectMake(10+CGRectGetMaxX(self.imageViewHeader.frame), CGRectGetMinY(self.imageViewHeader.frame)+7, ScreenWidth-CGRectGetMaxX(self.imageViewHeader.frame)-10, 18);
            self.labelRanking.frame = CGRectMake(10+CGRectGetMaxX(self.imageViewHeader.frame),CGRectGetMaxY(self.imageViewHeader.frame)-10 - 16,ScreenWidth-CGRectGetMaxX(self.imageViewHeader.frame)-10,14);

        }else if(ScreenWidth == 375){
            // 6 7
            self.labelName.font = FONT_(15);
            self.labelRanking.font = FONT_(14);

            viewBack.frame = CGRectMake(0, 0, ScreenWidth, 120);
            self.imageViewHeader.frame = CGRectMake(15,(120-75)/2 ,75,75);
            [self.imageViewHeader.layer setCornerRadius:self.imageViewHeader.frame.size.height/2];

            self.labelName.frame = CGRectMake(10+CGRectGetMaxX(self.imageViewHeader.frame), CGRectGetMinY(self.imageViewHeader.frame)+8, ScreenWidth-CGRectGetMaxX(self.imageViewHeader.frame)-10, 20);
            self.labelRanking.frame = CGRectMake(10+CGRectGetMaxX(self.imageViewHeader.frame),CGRectGetMaxY(self.imageViewHeader.frame)-10 - 16,ScreenWidth-CGRectGetMaxX(self.imageViewHeader.frame)-10,16);
        }else {
            //plus
            self.labelName.font = FONT_(15.5);
            self.labelRanking.font = FONT_(14.5);

            viewBack.frame = CGRectMake(0, 0, ScreenWidth, 128);
            self.imageViewHeader.frame = CGRectMake(15,(128-80)/2 ,80,80);
            [self.imageViewHeader.layer setCornerRadius:self.imageViewHeader.frame.size.height/2];

            self.labelName.frame = CGRectMake(10+CGRectGetMaxX(self.imageViewHeader.frame), CGRectGetMinY(self.imageViewHeader.frame)+10, ScreenWidth-CGRectGetMaxX(self.imageViewHeader.frame)-10, 22);
            self.labelRanking.frame = CGRectMake(10+CGRectGetMaxX(self.imageViewHeader.frame),CGRectGetMaxY(self.imageViewHeader.frame)-10 - 16,ScreenWidth-CGRectGetMaxX(self.imageViewHeader.frame)-10,18);
        }
    }
    return self;
}

@end
